package com.mspbots.web.core.model;

import com.fasterxml.jackson.databind.JsonNode;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Transient;
import org.springframework.data.relational.core.mapping.Table;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * com.mspbots.web.core.model.Tenant
 *
 * @author Alex bob(https://github.com/vnobo)
 * @date Created by 2019/8/26
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table("tenant")
public class Tenant implements Serializable {

    private Integer id;
    private String name;
    private String url;
    private String shortName;
    private String description;
    private Integer statusId;
    private LocalDateTime createDate;
    private String mailPostfix;
    private String microsoftId;
    private JsonNode extend;
    private String source;
    private String psa;
    private String phoneNumber;
    private Boolean receiveEmail;
    private String registEmail;
    private String timezoneFull;
    private String timezoneShort;
    private String timezoneOffset;
    private Boolean teamsAuthority;

    @Transient
    private transient List<TenantConfiguration> configuration;
    @Transient
    private transient String status;
    @Transient
    private transient Integer userCount;
    @Transient
    private transient LocalDateTime lastUseTime;
    @Transient
    private transient String lastUserLogged;
    @Transient
    private transient LocalDateTime lastUserLoggedTime;

}
